<template>
    <CommonPage :tableConfig="option" formKey="loanAcceptance"></CommonPage>
    <ElDialog v-model="dialog" width="800px" title="详情">
        <LoanAcceptanceDetail :rowInfo="rowInfo"/>
    </ElDialog>
</template>
<script setup>
import CommonPage from '@/components/CommonPage/index.vue'
import LoanAcceptanceDetail from './components/loanAcceptanceDetail.vue'
import {loadStatus, platform, stageStatus, orderStatus} from "@/utils/enum.js"
import { reactive, ref } from 'vue';
import {ElDialog } from 'element-plus'

const dialog = ref(false)
const rowInfo = ref()
const option = reactive({
    formItems: [
        {label: '客户企业名称', prop: 'custName', type: 'input', show: true},
        {label: '渠道名称', prop: 'channelName', type: 'input', show: true},
        {label: '产品名称', prop: 'productName', type: 'input', show: true},
        {label: '电商平台', prop: 'eBusinessPlatform', type: 'select', show: true, options: platform},
        // {label: '订单阶段', prop: 'orderStage', type: 'select', show: true, options: orderStage},
        // {label: '阶段状态', prop: 'stageStatus', type: 'select', show: true, options: stageStatus},
        {label: '订单状态', prop: 'orderStatus', type: 'select', show: true, options: orderStatus},
    ],
    otherParams: {orderStage: 3},
    buttons: [
        {label: "导出", icon: 'Download', auth: '', handle: (event)=> {download()}},
    ],
    options: [
        {label: '详情', handle: (event) => {handleDetail(event)}, isShow:() => {return true}},
    ]
})
// 查看详情
const handleDetail = (info) => {
    console.log(info);
    rowInfo.value = info
    dialog.value = true
}
</script>